package com.fr.report;

import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import java.io.Serializable;

public class WorkSheetAttr
  implements XMLReadable, Cloneable, Serializable
{
  private byte direction = 2;
  private int startIndex = -1;
  private int endIndex = -1;
  private String indexsToCopy = "";
  private int maxCount = -1;
  private int count = -1;
  private boolean isShowBlank = false;

  public byte getDirection()
  {
    return this.direction;
  }

  public void setDirection(byte paramByte)
  {
    this.direction = paramByte;
  }

  public int getStartIndex()
  {
    return this.startIndex;
  }

  public void setStartIndex(int paramInt)
  {
    this.startIndex = paramInt;
  }

  public int getEndIndex()
  {
    return this.endIndex;
  }

  public void setEndIndex(int paramInt)
  {
    this.endIndex = paramInt;
  }

  public String getIndexsToCopy()
  {
    return this.indexsToCopy;
  }

  public void setIndexsToCopy(String paramString)
  {
    this.indexsToCopy = paramString;
  }

  public int getMaxCount()
  {
    return this.maxCount;
  }

  public void setMaxCount(int paramInt)
  {
    this.maxCount = paramInt;
  }

  public int getCount()
  {
    return this.count;
  }

  public void setCount(int paramInt)
  {
    this.count = paramInt;
  }

  public boolean isShowBlank()
  {
    return this.isShowBlank;
  }

  public void setShowBlank(boolean paramBoolean)
  {
    this.isShowBlank = paramBoolean;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isAttr())
    {
      String str;
      if ((str = paramXMLableReader.getAttr("direction")) != null)
        this.direction = Byte.parseByte(str);
      if ((str = paramXMLableReader.getAttr("indexsToCopy")) != null)
        this.indexsToCopy = str;
      if ((str = paramXMLableReader.getAttr("start")) != null)
        this.startIndex = Integer.parseInt(str);
      if ((str = paramXMLableReader.getAttr("end")) != null)
        this.endIndex = Integer.parseInt(str);
      if ((str = paramXMLableReader.getAttr("maxRowOrColumn")) != null)
        this.maxCount = Integer.parseInt(str);
      if ((str = paramXMLableReader.getAttr("columnOrRowCount")) != null)
        this.count = Integer.parseInt(str);
      if ((str = paramXMLableReader.getAttr("isShowBlank")) != null)
        this.isShowBlank = Boolean.valueOf(str).booleanValue();
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("WorkSheetAttr");
    if (this.direction != 2)
      paramXMLPrintWriter.attr("direction", this.direction);
    if (this.indexsToCopy.length() > 0)
      paramXMLPrintWriter.attr("indexsToCopy", this.indexsToCopy);
    if (this.startIndex > -1)
      paramXMLPrintWriter.attr("start", this.startIndex);
    if (this.endIndex > -1)
      paramXMLPrintWriter.attr("end", this.endIndex);
    if (this.maxCount > -1)
      paramXMLPrintWriter.attr("maxRowOrColumn", this.maxCount);
    if (this.count > -1)
      paramXMLPrintWriter.attr("columnOrRowCount", this.count);
    if (this.isShowBlank == true)
      paramXMLPrintWriter.attr("isShowBlank", this.isShowBlank);
    paramXMLPrintWriter.end();
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}